#pragma once

#include <vector>

namespace Lijol
{

/*
	JoystickEnumerationTrigger

	Base class for the object that can be used to trigger an enumeration 
	at the JoystickManager level.
*/
class JoystickEnumerationTrigger
{
public:
	virtual~ JoystickEnumerationTrigger() {}
	virtual bool	enumerationNeeded() = 0;
};
	
/*
	TimeBasedEnumerationTrigger
*/
class TimeBasedEnumerationTrigger : public JoystickEnumerationTrigger
{
public:
	TimeBasedEnumerationTrigger( unsigned int intervalInMs );	
	virtual bool	enumerationNeeded();

private:
	static unsigned int mInitialSecond;
	static unsigned int getTimeAsMilliseconds();
	
	int				updateNextTime();

	unsigned int	mIntervalInMs;
	unsigned int	mStartTime;
	unsigned int	mNextTime;
};	

}